-
Notifications
You must be signed in to change notification settings - Fork 268
Support push for Live Activity #668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
hi bro when the feature can be used? Thanks!
|
HI Guys, |
@lahirumaramba Hi, I have a request regarding for code review of this 👀 The Please, code review if possible would be greatly appreciated 🙋🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @morikuni, Thanks for getting started on this. Could you remove the extra fields added and limit to just LiveActivityToken field. Thanks!
As per review feedback, removed all extra Live Activity fields from Aps struct: - Removed StaleDate, ContentState, Timestamp, Event, DismissalDate, AttributesType, and Attributes fields - Removed LiveActivityEvent type and constants - Updated tests to only test LiveActivityToken field - Kept only the essential LiveActivityToken field in APNSConfig as requested
@jonathanedey I’ve removed all the extra fields and now only include the LiveActivityToken. Could you review it again? |
Thanks again @morikuni for the contribution! |
As per review feedback, removed all extra Live Activity fields from Aps struct:
Why was this change reverted? How can I pass fields like Event and ContentState through an HTTP request Or how should I construct the request parameters for LiveActivity? I see that currently there is only a type APNSPayload |
Has your issue been resolved? After sending the liveActivity request, does the iOS app respond |
Hi @Mickey0811, These fields can be set using the &messaging.Message{
Token: "test-token",
APNS: &messaging.APNSConfig{
LiveActivityToken: "live-activity-token",
Payload: &messaging.APNSPayload{
Aps: &messaging.Aps{
CustomData: map[string]interface{}{
"event": "start",
"content-state": map[string]interface{}{
"demo": 1,
},
},
},
},
},
}, If that's not what you're seeing, could you please open a new issue and include as many details as you can (or even a minimal repro) so we can take look. |
Added keys for Live Activity push.
Firebase Document: https://firebase.google.com/docs/cloud-messaging/ios/live-activity
Firebase API Reference: https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#apnsconfig
APNS Reference: https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification